#!/bin/bash

# ----------------------------------------------------------------------
# Filename:   75632-getenforce.sh
# Version:    1.0
# Date:       2013/12/17
# Author:     yuanhui.shi
# Email:      yuanhui.shi@cs2c.com.cn
# Summary:    03系统安全功能-01SELinux-03SELinux重要命令-01SELinux运行状态-01getenforce模式查询
# Notes:      getenforce
# Copyright:  China Standard Software Co., Ltd.
# History：     
#             Version 1.0, 2013/12/17
#             -   The first one
# ----------------------------------------------------------------------

PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH

source ../../lib/Echo.sh
source ../../lib/XmlParse.sh


function CleanData ()
{
  
  EchoInfo "75632-getenforce.sh执行完毕"
}

trap "CleanData" EXIT
SELINUX_STATUS=`getenforce`

    case ${SELINUX_STATUS} in
        Disabled) echo "输出状态正确，此时的状态为Disabled";;
        Permissive) echo "输出状态正确，此时的状态为Permissive";;
        Enforcing) echo "输出状态正确，此时的状态为Enforcing";;
        *) echo "输出状态错误";;

    esac

